3.4.98 \(\int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx\) [398]

Optimal. Leaf size=103 \[ \frac {a b \sec ^3(c+d x)}{5 d}+\frac {\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}+\frac {\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac {\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d} \]

[Out]

1/5*a*b*sec(d*x+c)^3/d+1/5*sec(d*x+c)^5*(b+a*sin(d*x+c))*(a+b*sin(d*x+c))/d+1/5*(4*a^2-b^2)*tan(d*x+c)/d+1/15*
(4*a^2-b^2)*tan(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2770, 2748, 3852} \begin {gather*} \frac {\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d}+\frac {\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac {a b \sec ^3(c+d x)}{5 d}+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6*(a + b*Sin[c + d*x])^2,x]

[Out]

(a*b*Sec[c + d*x]^3)/(5*d) + (Sec[c + d*x]^5*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x]))/(5*d) + ((4*a^2 - b^2)
*Tan[c + d*x])/(5*d) + ((4*a^2 - b^2)*Tan[c + d*x]^3)/(15*d)

Rule 2748

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b)*((g*Co
s[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x
] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 2770

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-(g*C
os[e + f*x])^(p + 1))*(a + b*Sin[e + f*x])^(m - 1)*((b + a*Sin[e + f*x])/(f*g*(p + 1))), x] + Dist[1/(g^2*(p +
 1)), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(p + 2) + a*b*(m + p + 1)*S
in[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && (Integers
Q[2*m, 2*p] || IntegerQ[m])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}-\frac {1}{5} \int \sec ^4(c+d x) \left (-4 a^2+b^2-3 a b \sin (c+d x)\right ) \, dx\\ &=\frac {a b \sec ^3(c+d x)}{5 d}+\frac {\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}-\frac {1}{5} \left (-4 a^2+b^2\right ) \int \sec ^4(c+d x) \, dx\\ &=\frac {a b \sec ^3(c+d x)}{5 d}+\frac {\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}-\frac {\left (4 a^2-b^2\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 d}\\ &=\frac {a b \sec ^3(c+d x)}{5 d}+\frac {\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}+\frac {\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac {\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.46, size = 84, normalized size = 0.82 \begin {gather*} \frac {\sec ^5(c+d x) \left (48 a b+20 \left (2 a^2+b^2\right ) \sin (c+d x)+5 \left (4 a^2-b^2\right ) \sin (3 (c+d x))+4 a^2 \sin (5 (c+d x))-b^2 \sin (5 (c+d x))\right )}{120 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6*(a + b*Sin[c + d*x])^2,x]

[Out]

(Sec[c + d*x]^5*(48*a*b + 20*(2*a^2 + b^2)*Sin[c + d*x] + 5*(4*a^2 - b^2)*Sin[3*(c + d*x)] + 4*a^2*Sin[5*(c +
d*x)] - b^2*Sin[5*(c + d*x)]))/(120*d)

________________________________________________________________________________________

Maple [A]
time = 0.41, size = 92, normalized size = 0.89

method result size
derivativedivides \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {2 a b}{5 \cos \left (d x +c \right )^{5}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{15 \cos \left (d x +c \right )^{3}}\right )}{d}\) \(92\)
default \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {2 a b}{5 \cos \left (d x +c \right )^{5}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{15 \cos \left (d x +c \right )^{3}}\right )}{d}\) \(92\)
risch \(-\frac {4 i \left (48 i a b \,{\mathrm e}^{5 i \left (d x +c \right )}+15 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-40 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-5 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-20 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+5 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-4 a^{2}+b^{2}\right )}{15 d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{5}}\) \(113\)
norman \(\frac {-\frac {4 a b}{5 d}-\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{2} \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 \left (a^{2}+2 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {4 \left (a^{2}+2 b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 \left (11 a^{2}+16 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}-\frac {2 \left (11 a^{2}+16 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}-\frac {8 \left (19 a^{2}+14 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}-\frac {4 a b \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {8 a b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}-\frac {8 a b \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {12 a b \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {44 a b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) \(315\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(-a^2*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)+2/5*a*b/cos(d*x+c)^5+b^2*(1/5*sin(d*x+c)^3/cos
(d*x+c)^5+2/15*sin(d*x+c)^3/cos(d*x+c)^3))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 76, normalized size = 0.74 \begin {gather*} \frac {{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{2} + {\left (3 \, \tan \left (d x + c\right )^{5} + 5 \, \tan \left (d x + c\right )^{3}\right )} b^{2} + \frac {6 \, a b}{\cos \left (d x + c\right )^{5}}}{15 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/15*((3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^2 + (3*tan(d*x + c)^5 + 5*tan(d*x + c)^3)*b^2
 + 6*a*b/cos(d*x + c)^5)/d

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 77, normalized size = 0.75 \begin {gather*} \frac {6 \, a b + {\left (2 \, {\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, a^{2} + 3 \, b^{2}\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/15*(6*a*b + (2*(4*a^2 - b^2)*cos(d*x + c)^4 + (4*a^2 - b^2)*cos(d*x + c)^2 + 3*a^2 + 3*b^2)*sin(d*x + c))/(d
*cos(d*x + c)^5)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6*(a+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 5.83, size = 181, normalized size = 1.76 \begin {gather*} -\frac {2 \, {\left (15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 30 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 20 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 20 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 58 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 8 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 60 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 20 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 20 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a b\right )}}{15 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-2/15*(15*a^2*tan(1/2*d*x + 1/2*c)^9 + 30*a*b*tan(1/2*d*x + 1/2*c)^8 - 20*a^2*tan(1/2*d*x + 1/2*c)^7 + 20*b^2*
tan(1/2*d*x + 1/2*c)^7 + 58*a^2*tan(1/2*d*x + 1/2*c)^5 + 8*b^2*tan(1/2*d*x + 1/2*c)^5 + 60*a*b*tan(1/2*d*x + 1
/2*c)^4 - 20*a^2*tan(1/2*d*x + 1/2*c)^3 + 20*b^2*tan(1/2*d*x + 1/2*c)^3 + 15*a^2*tan(1/2*d*x + 1/2*c) + 6*a*b)
/((tan(1/2*d*x + 1/2*c)^2 - 1)^5*d)

________________________________________________________________________________________

Mupad [B]
time = 5.36, size = 103, normalized size = 1.00 \begin {gather*} \frac {\frac {2\,a\,b}{5}+\frac {a^2\,\sin \left (c+d\,x\right )}{5}+\frac {b^2\,\sin \left (c+d\,x\right )}{5}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {4\,a^2\,\sin \left (c+d\,x\right )}{15}-\frac {b^2\,\sin \left (c+d\,x\right )}{15}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^2\,\sin \left (c+d\,x\right )}{15}-\frac {2\,b^2\,\sin \left (c+d\,x\right )}{15}\right )}{d\,{\cos \left (c+d\,x\right )}^5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d*x))^2/cos(c + d*x)^6,x)

[Out]

((2*a*b)/5 + (a^2*sin(c + d*x))/5 + (b^2*sin(c + d*x))/5 + cos(c + d*x)^2*((4*a^2*sin(c + d*x))/15 - (b^2*sin(
c + d*x))/15) + cos(c + d*x)^4*((8*a^2*sin(c + d*x))/15 - (2*b^2*sin(c + d*x))/15))/(d*cos(c + d*x)^5)

________________________________________________________________________________________